import Vue from "vue";
import VueRouter from "vue-router";
import D from "@/views/D.vue";
import B from "@/views/B.vue";
import C from "@/views/C.vue";

import BB from "@/views/双层饼/BB.vue";
import CC from "@/views/双层饼/CC.vue";
import DD from "@/views/双层饼/DD.vue";

// import BBB from "@/views/双层饼/三层饼/BBB.vue";
// import CCC from "@/views/双层饼/三层饼/CCC.vue";
// import DDD from "@/views/双层饼/三层饼/DDD.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/d",
  },
  {
    path: "/d",
    component: D,
  },
  {
    path: "/b",
    component: B,
    // children: [{}],
  },
  {
    path: "/c",
    component: C,
    children: [
      {
        path: "bb",
        name: "BB",
        component: BB,
      },
      {
        path: "cc",
        name: "CC",
        component: CC,
      },
      {
        path: "dd",
        name: "DD",
        component: DD,
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
